package month5.day5;

import java.io.FileInputStream;
import java.io.ObjectInputStream;

public class Zhanghao extends Thread{
    private String name="admin";
    private String mima="admin";
    public static final String OBJFILE = "E:\\Java8\\新建文件夹\\C0.txt";
    public boolean panduna(String name,String mima){
        if(name.equals(this.name)&&mima.equals(this.mima))
            return true;
        return false;
    }
    public static Text getFromeFile() {
        try {
            ObjectInputStream oin = new ObjectInputStream(new FileInputStream(OBJFILE));
            Text c = (Text) oin.readObject();
            oin.close();
            return c;
        } catch (Exception e) {
//            throw new RuntimeException(e);
            return null;
        }
    }

    @Override
    public void run() {
        try {
            sleep(40000);
        } catch (InterruptedException e) {

        }
        System.exit(404);
    }
}
